﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="http://localhost" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://localhost" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:element name="report">
		<xs:annotation>
			<xs:documentation xml:lang="ro">Raportare analitică pentru spitale</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Internships">
					<xs:annotation>
						<xs:documentation xml:lang="ro">Lista internarilor.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="Internship" minOccurs="0" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation xml:lang="ro">Internare efectuata.</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<xs:element name="secondaryDiagnostics" minOccurs="0" maxOccurs="unbounded">
											<xs:annotation>
												<xs:documentation xml:lang="ro">Informatii referitoare la diagnosticele secundare</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:attribute name="AppID" type="xs:string" use="required">
													<xs:annotation>
														<xs:documentation xml:lang="ro">Identificator unic in aplicatia de raportare. 
                            Acest atribut este folosit la identificarea înregistrării raportate.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="secondaryDiagnostic" type="xs:string" use="required">
													<xs:annotation>
														<xs:documentation xml:lang="ro">Codul diagnosticului secundar. Acest cod este preluat din nomenclatorul CIM10S</xs:documentation>
													</xs:annotation>
												</xs:attribute>
											</xs:complexType>
										</xs:element>
										<xs:element name="Services" maxOccurs="unbounded">
											<xs:annotation>
												<xs:documentation xml:lang="ro">Informatii referitoare la procedurile efectuate in cadrul  internarii</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:attribute name="AppID" type="xs:string" use="required">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Identificator unic in aplicatia de nivel 4.
                              Acest atribut este folosit la identificarea randului raportat.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="service" type="xs:string" use="required">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Codul serviciului prestat.
                              Acest cod este preluat din nomenclatorul HospitalServices.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="serviceDate" type="xs:date" use="required">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Data la care a fost efectuat serviciul.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
											</xs:complexType>
										</xs:element>
										<xs:element name="ForeignPerson" minOccurs="0">
											<xs:annotation>
												<xs:documentation xml:lang="ro">Datele referitoare la persoane străine.</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:attribute name="personIdentifier" type="xs:string" use="required">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Codul de identificare al persoanei staine.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="personFirstName" type="xs:string" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Prenumele persoanei straine.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="personLastName" type="xs:string" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Numele persoanei strine.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="birthDate" type="xs:date" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Data de nastere a persoanei straine.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="countryCode" type="xs:string" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Codul tarii cetateniei persoanei straine.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="cardCode" type="xs:string" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Codul cardului de asigurat al persoanei straine. 
                              (In cazul in care persoana are card de asigurare european)
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="cardExpireDate" type="xs:date" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Data de expirare a cardului de asigurare.
                              (In cazul in care persoana are card de asigurare european)
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="emissiveOrgUnitCode" type="xs:string" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Codul unitatii care a emis cardul de asigurare.
                              (In cazul in care persoana are card de asigurare european)
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="emissiveOrgUnitName" type="xs:string" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Numele unitatii care a emis cardul de asigurare.
                              (In cazul in care persoana are card de asigurare european)
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="emissiveOrgUnitAddress" type="xs:string" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Adresa unitatii care a emis cardul de asigurare.
                              (In cazul in care persoana are card de asigurare european)
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
									<xs:attribute name="AppID" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Identificator unic in aplicatia de nivel 4.
                        Acest atribut este folosit la identificarea randului raportat.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="medicalSheetNo" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Numarul foii de observatie clinica generala sau a fisei pentru spitalizare de zi
                        </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="Pid" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">CNP-ul bolnavului</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="firstName" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Prenumele bolnavului</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="lastName" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Numele bolnavului</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="birthDate" type="xs:date" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Data nasterii bolnavului</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="sex" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Sexul pacientului.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="insuranceType" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Tipul asigurarii de sanatate.</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:enumeration value="O">
													<xs:annotation>
														<xs:documentation xml:lang="ro">Obligatorie</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="F">
													<xs:annotation>
														<xs:documentation xml:lang="ro">Facultativa</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="E">
													<xs:annotation>
														<xs:documentation xml:lang="ro">Eurocard</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="A">
													<xs:annotation>
														<xs:documentation xml:lang="ro">Acord international</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="intermentDate" type="xs:date" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Data internării</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="referringNo" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Numarul biletului de trimitere</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="referringDate" type="xs:date" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Data trimiterii</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="referringStencilNo" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Parafa medicului care a facut trimiterea </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="referringCtr" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Contractul medicului care a facut trimiterea</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="stencilNo" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Parafa medicului curant</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="releasedDate" type="xs:date" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Data externarii</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="orgUnitCode" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                          Codul CJAS-ului la care este luat in evidenta asiguratul asa cum reiese din raportarea spitalului
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="internmentDiagCode" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                          Codul diagnosticului la internare. Acest cod este preluat din nomenclatorul COM10S.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="mainDiagCode" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul diagnosticului principal. Acest cod este preluat din nomenclatorul COM10S.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="at72hDiagCode" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul diagnosticului la 72 de ore. Acest cod este preluat din nomenclatorul COM10S.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="surgeonStencilNo" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Parafa medicului principal.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="specialSituationCode" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul situatiei speciale la internare. Acest cod este preluat din nomenclatorul SpecialSituations.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="referringDiagCode" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Diagnosticul de pe biletul de trimitere. Acest cod este preluat din nomenclatorul COM10S.</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="releaseType" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Tipul externarii. Acest atribut poate avea urmatoarele valori:
                        1 -&gt; EXTERNAT
                        2 -&gt; EXTERNAT LA CERERE
                        3 -&gt; TRANSFER INTERSPITALICESC
                        4 -&gt; DECEDAT
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="internmentCriteriaCd" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul criteriului de internare. Acest cod este preluat din nomenclatorul InternmentCriterias.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="internmentType" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Tipul internarii. Acest atribut poate avea urmatoarele valori:
                        1 -&gt; URGENŢĂ
                        2 -&gt; TRIMITERE MEDIC DE FAMILIE
                        3 -&gt; TRIMITERE MEDIC SPECIALIST AMBULATORIU
                        4 -&gt; TRANSFER INTERSPITALICESC
                        5 -&gt; LA CERERE
                        9 -&gt; ALTE
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="IncdsReportingDate" type="xs:date" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Data la care s-a facut raportarea catre INCDS
                        </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="caseId" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul de identificare al cazului in aplicatia DRG
                        </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="releaseState" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul starii la externare. Acest atribut poate avea urmatoarele valori:
                        1 -&gt; VINDECAT
                        2 -&gt; AMELIORAT
                        3 -&gt; STATIONAR
                        4 -&gt; AGRAVAT
                        5 -&gt; DECEDAT
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="standardDuration" type="xs:boolean" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Spitalizare standard?
                        ( 
                        DA = valoarea spitalizarii se calculeaza ca produsul dintre durata optimă de spitalizare si tariful negociat ; 
                        NU = altfel 
                        ) 
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="internmentTime" type="xs:integer" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Numarul de zile de internare</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="tariffType" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Tipul de tarif</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:enumeration value="0">
													<xs:annotation>
														<xs:documentation xml:lang="ro">tarif pe caz rezolvat</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="1">
													<xs:annotation>
														<xs:documentation xml:lang="ro">tarif pe serviciu efectuat</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="deptCode" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul sectiei in care a avut loc internarea.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="city" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul localitatii de domiciliu a bolnavului. Acest atribut este preluat din nomenclatorul Cities.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="district" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul judetului de domiciliu a bolnavului. Acest atribut este preluat din nomenclatorul Counties.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="citizenship" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul cetateniei bolnavului. Acest atribut este preluat din nomenclatorul Citizenships.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="categAsig" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Categoria de asigurat</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:minLength value="1"/>
												<xs:maxLength value="2"/>
												<xs:enumeration value="1">
													<xs:annotation>
														<xs:documentation xml:lang="ro">SALARIAT</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="2">
													<xs:annotation>
														<xs:documentation xml:lang="ro">COASIG</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="3">
													<xs:annotation>
														<xs:documentation xml:lang="ro">PENSIONAR</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="4">
													<xs:annotation>
														<xs:documentation xml:lang="ro">COPIL &lt; 18 ANI</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="5">
													<xs:annotation>
														<xs:documentation xml:lang="ro">ELEV=/UCENIC/STUDENT 18-26 ANI</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="6">
													<xs:annotation>
														<xs:documentation xml:lang="ro">GRAVIDA</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="7">
													<xs:annotation>
														<xs:documentation xml:lang="ro">VETERAN</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="8">
													<xs:annotation>
														<xs:documentation xml:lang="ro">REVOLUTIONAR</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="9">
													<xs:annotation>
														<xs:documentation xml:lang="ro">HANDICAP</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="10">
													<xs:annotation>
														<xs:documentation xml:lang="ro">PNS</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="11">
													<xs:annotation>
														<xs:documentation xml:lang="ro">AJUTOR SOCIAL</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="12">
													<xs:annotation>
														<xs:documentation xml:lang="ro">SOMAJ</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
												<xs:enumeration value="13">
													<xs:annotation>
														<xs:documentation xml:lang="ro">ALTE</xs:documentation>
													</xs:annotation>
												</xs:enumeration>
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="AnalyticalPrescriptions" minOccurs="0">
					<xs:annotation>
						<xs:documentation xml:lang="ro">
              Lista retetelor prescrise.
            </xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="AnalyticalPrescription" minOccurs="0" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation xml:lang="ro">
                    Reteta prescrisa.
                  </xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<xs:element name="AnalyticalPrescDrug" maxOccurs="unbounded">
											<xs:annotation>
												<xs:documentation xml:lang="ro">
                          Medicament prescris pe reteta.
                        </xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:attribute name="no" type="xs:integer" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Numar de ordine pe reteta.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="drugCode" type="xs:string" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Codul medicamentului. Acest atribut se preia din nomenclatorul Drugs.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="activeSubstance" type="xs:string" use="required">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Codul substantei active. Acest atribut se preia din nomenclatorul ActiveSubstances.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="concentration" type="xs:string" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Codul concentratiei. Acest atribut se preia din nomenclatorul Concentrations.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="diseaseCategory" type="xs:string" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Codul categoriei de boala. Acest atribut se preia din nomenclatorul DiseaseCategories.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="diseaseCode" type="xs:string" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Codul de boala. Acest atribut se preia din nomenclatorul ICD10.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="pharmaceuticalForm" type="xs:string" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Codul formei farmaceutice. Acest atribut se preia din nomenclatorul PharmaceuticalForms.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="quantity" type="xs:double" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Cantitatea.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="dose" type="xs:string" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Doza zilnica.
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="diagnosticType" type="xs:string" use="required">
													<xs:annotation>
														<xs:documentation xml:lang="ro">
                              Codul tipului de diagnostic. Acest atribut poate avea urmatoarele valori:
                              1 -&gt; ACUT
                              2 -&gt; SUBACUT
                              3 -&gt; CRONIC
                            </xs:documentation>
													</xs:annotation>
												</xs:attribute>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
									<xs:attribute name="AppID" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Identificator unic in aplicatia de nivel 4.
                        Acest atribut este folosit la identificarea randului raportat.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="stencilNo" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Parafa medicului care a facut prescrierea.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="personPID" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        CNP-ul persoanei care a primit prescrierea
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="patientInsuranceHouse" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul casei de asigurari a pacientului. Acest atribut este preluat din nomenclatorul OrgUnits.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="serialNo" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Numarul retetei.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="serialCode" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Seria retetei.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="contractNo" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Contractul pe baza caruia s-a prescris reteta.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="prescriptionDate" type="xs:date" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Data prescrierei retetei.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="merNo" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Numarul fisei de internare.
                      </xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:minLength value="1"/>
												<xs:maxLength value="20"/>
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="merDate" type="xs:date" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Data fisei de internare.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="patientType" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Tipul de pacient. ???
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="no" type="xs:integer" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        ???
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="nhp" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        PNS-ul pentru care a fost prescrisa reteta. Acest atribut este preluat din nomenclatorul NHPS.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="prescriptionType" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Tipul de reteta. Acest atribut este preluat din nomenclatorul PrescriptionTypes.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="noDaysTreatment" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Numarul de zile de tratament.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="AnalyticalHomeCare" minOccurs="0" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation xml:lang="ro">
              Lista cu recomandarile de ingrijiri la domiciliu.
            </xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="AnalyticalServices" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation xml:lang="ro">
                    Recomandare de ingrijire la domiciliu.
                  </xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:attribute name="servCode" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul serviciului recomandat. Acest atribut este preluat din nomenclatorul Services.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="period" type="xs:integer" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Perioada (in zile) pentru care sunt recomandate serviciile.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="cycle" type="xs:integer" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Ciclul (in zile) de prestare de servicii.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="qtyPerCycle" type="xs:integer" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Cantitate de servicii recomandate pe ciclu.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attribute name="AppID" type="xs:string" use="required">
							<xs:annotation>
								<xs:documentation xml:lang="ro">
                  Identificator unic in aplicatia de nivel 4.
                  Acest atribut este folosit la identificarea randului raportat.
                </xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="serialNo" type="xs:string" use="required">
							<xs:annotation>
								<xs:documentation xml:lang="ro">
                  Numarul recomandarii.
                </xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="serialCode" type="xs:string" use="required">
							<xs:annotation>
								<xs:documentation xml:lang="ro">
                  Seria recomandarii.
                </xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="recomDate" type="xs:date" use="required">
							<xs:annotation>
								<xs:documentation xml:lang="ro">
                  Data recomandarii.
                </xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="repPhysician" type="xs:string" use="optional">
							<xs:annotation>
								<xs:documentation xml:lang="ro">
                  Parafa medicului care a facut recomandarea.
                </xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="repDiagnosticCode" type="xs:string" use="optional">
							<xs:annotation>
								<xs:documentation xml:lang="ro">
                  Diagnosticul pentru care a fost facuta recomandarea. Acest atribut este preluat din nomenclatorul ICD10S.
                </xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="repPid" type="xs:string" use="optional">
							<xs:annotation>
								<xs:documentation xml:lang="ro">
                  CNP-ul pacientului pentru care a fost facuta recomandarea.
                </xs:documentation>
							</xs:annotation>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
				<xs:element name="AnalyticalMedicalDevices" minOccurs="0">
					<xs:annotation>
						<xs:documentation xml:lang="ro">
            Lista recomandarilor de dispozitive medicale prescrise.
            </xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="AnalyticalMedicalDevice" minOccurs="0" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation xml:lang="ro">
                    Recomandare de dispozitiv medical prescris.
                  </xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:attribute name="AppID" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Identificator unic in aplicatia de nivel 4.
                        Acest atribut este folosit la identificarea randului raportat.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="serialNo" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Numarul recomandarii.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="serialCode" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                      Seria recomandarii.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="recomDate" type="xs:date" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Data recomandarii
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="deviceType" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Tipul de dispozitiv prescris. Acest atribut poate avea urmatoarele valori:
                        0 -&gt; DREPT
                        1 -&gt; STANG
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="prothesysType" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Tipul de proteza. Acest atribut poate avea urmatoarele valori:
                        0 -&gt; DEFINITIVA
                        1 -&gt; TEMPORARA
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="deviceCode" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul dispozitivului medical recomandat. Acest atribut este preluat din nomenclatorul MedicalDeviceTypes
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="repPhysician" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Parafa medicului care a prescris recomandarea.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="repDiagnosticCode" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul diagnosticului pentru care a fost prescrisa recomandarea. Acest atribut este preluat din nomenclatorul ICD10S
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="repPid" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        CNP-ul pacientului pentru care a fost prescrisa recomandarea.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="AnalyticalMedicalNotes" minOccurs="0">
					<xs:annotation>
						<xs:documentation xml:lang="ro">
              Lista biletelor de trimitere prescrise.
            </xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="AnalyticalMedicalNote" minOccurs="0" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation xml:lang="ro">
                  Bilet de trimitere prescris.
                  </xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:attribute name="AppID" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Identificator unic in aplicatia de nivel 4.
                        Acest atribut este folosit la identificarea randului raportat.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="stencilNo" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Parafa medicului care a prescris trimiterea.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="personPID" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        CNP-ul pacientului pentru care a fost prescrisa trimiterea.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="patientInsuranceHouse" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul casei de asigurari a pacientului. Acest atribut este preluat din nomenclatorul OrgUnits.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="serialNo" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Numarul trimiterii.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="serialCode" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Seria trimiterii
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="issueDate" type="xs:date" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Data emiterii trimiterii.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="merNo" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Numarul fisei de internare.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="merDate" type="xs:date" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Data fisei de internare.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="ticketType" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Tipul de trimitere. Acest atribut poate avea urmatoarele valori:
                        1 -&gt; CLINIC (DE SPECIALITATE)
                        2 -&gt; PARACLINIC (DE LABORATOR)
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="no" type="xs:integer" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        ???
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="diagnostic" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul diagnosticului pentru care a fost emisa trimiterea. Acest atribut este preluat din nomenclatorul ICD10S.
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="specialty" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">
                        Codul specialitatii clinice pentru care a fost emisa trimiterea. Acest atribut este preluat din nomenclatorul Specialities. 
                      </xs:documentation>
										</xs:annotation>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="AppKey" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="ro">Cheia de identificare a aplicaţiei de raportare (producator de software 3rd partry)</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="AppID" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="ro">
            Identificator unic in aplicatia de nivel 4.
            Acest atribut este folosit la identificarea raportarii.
          </xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="hospitalCode" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="ro">
            Codul unitatii care face raportarea.
          </xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="fiscalCode" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="ro">
            Codul fiscal al unitatii care face raportarea.
          </xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="insuranceHouse" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="ro">
            Codul casei de asigurari cu care este contractul. Acest atribut este preluat din nomenclatorul OrgUnits.
          </xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="contractNo" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="ro">
            Numarul contractului pentru care se face raportarea.
          </xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="reportingDate" type="xs:date" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="ro">
            Data raportarii.
          </xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="startFrom" type="xs:date" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="ro">
            Data de inceput a perioadei raportate.
          </xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="endTo" type="xs:date" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="ro">
            Data de sfarsit a perioadei raportate.
          </xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="invoiceNo" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">Invoice number</xs:documentation>
					<xs:documentation xml:lang="ro">Numar factura</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="20"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="invoiceDate" type="xs:date" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">Invoice date</xs:documentation>
					<xs:documentation xml:lang="ro">Data factura</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="invoiceValue" type="xs:decimal" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">Invoice amount</xs:documentation>
					<xs:documentation xml:lang="ro">Valoare factura</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="reportType" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="ro">Tipul de raportare analitica.</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="SPZ">
							<xs:annotation>
								<xs:documentation xml:lang="ro">SPITALIZARE DE ZI</xs:documentation>
							</xs:annotation>
						</xs:enumeration>
						<xs:enumeration value="PAL">
							<xs:annotation>
								<xs:documentation xml:lang="ro">PALIATIVE</xs:documentation>
							</xs:annotation>
						</xs:enumeration>
						<xs:enumeration value="HEM">
							<xs:annotation>
								<xs:documentation xml:lang="ro">HEMODIALIZA</xs:documentation>
							</xs:annotation>
						</xs:enumeration>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
</xs:schema>
